import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import PlayListDetail from '../components/playlist/PlayListDetail.vue'

import RankListDetail from '../components/rank/RankListDetail.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: Home,
    meta: {
      showTab: true
    }
  },
  {
    path: '/rank',
    name: 'Rankn',
    component: () => import('../views/Rank.vue'),
    meta: {
      showTab: true
    }
  },
  {
    path: '/playlist',
    name: 'Playlist',
    component: () => import('../views/Playlist.vue'),
    meta: {
      showTab: true
    }
  },
  {
    path: '/singer',
    name: 'Singer',
    component: () => import('../views/Singer.vue'),
    meta: {
      showTab: true
    }
  },
  {
    path: '/search',
    name: 'Search',
    component: () => import('../components/home/Search.vue'),
    meta: {
      showTab: false
    }
  },
  {
    path: '/play',
    name: 'Play',
    component: () => import('../components/Play.vue'),
    meta: {
      showTab: false
    }
  },
  {
    path: '/mvdetail',
    name: 'MvDetail',
    component: () => import('../components/home/MvDetail.vue'),
    meta: {
      showTab: false
    }
  },
  {
    path: '/playlistdetail/:id',//动态路由
    name: 'PlayListDetail',
    component: PlayListDetail,
  },
 
  {
    path: '/singertabbar/:id',
    name: 'Singertabbar',
    component: () => import('../components/singer/Singertabbar.vue')
  },
  {
    path: '/singerchina/:id',
    name: 'Singerchina',
    component: () => import('../components/singer/Singerchina.vue')
  },
  {
    path: '/singerwestern/:id',
    name: 'Singerwestern', 
    component: () => import('../components/singer/Singerwestern.vue')
  },
  {
    path: '/singerjapan/:id',
    name: 'Singerjapan',
    component: () => import('../components/singer/Singerjapan.vue')
  },
  {
    path: '/singerkorea/:id',
    name: 'Singerkorea',
    component: () => import('../components/singer/Singerkorea.vue')
  },
  {
    path: '/singerdetails/:id',
    name: 'Singerdetails',
    component: () => import('../components/singer/Singerdetails.vue')

  },
  {
    path:'/ranklistdetail/:id',
    name:'RankListDetail',
    component:RankListDetail,
    meta:{
      showTab:false
    }
  },
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router
